<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="1" />
<title>用户信息修改</title>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script>
	$(document).ready(
					function() {
						//聚焦第一个输入框
						$("#userName").focus();
						//为inputForm注册validate函数
						$("#inputForm")
								.validate(
										{
											rules : {
												userName : {
													required : true,
													remote : "user!checkLoginName.action?oldLoginName="
															+ encodeURIComponent('${userName}')
												},
												name : "required",
												email : {
													email : true,
													remote : "user!checkregisterEmail.action?oldEmail="
															+ encodeURIComponent('${email}')
												},
												checkedRoleIds : "required"
											},
											messages : {
												userName : {
													remote : "<font color='red'>用户登录名已存在</font>"
												},
												passwordConfirm : {
													equalTo : "<font color='red'>输入与上面相同的密码</font>"
												},
												email : {
													remote : "该邮箱已被注册!"
												}
											}
										});
					});

</script>
</head>

<body>
	<!-- 直接主体内容开始  无需要涉及页面布局的  div 等   注意各页面中的Id 保持一致  页面中尽量用 el表达式 与html标签->
<!--   form定义 类似如下:  注意各页面中的Id 保持一致  class="inputForm"-->
	<form id="inputForm" action="user!saveInsideUser.action" method="post"
		class="yform">
		<div id="tabs"
			class="ui-tabs ui-widget ui-widget-content ui-corner-all">
			<ul
				class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
				<li><a id="construction"
					class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active  "
					href="#">内部用户</a>
				</li>
				<li><a id="construction"
					class="ui-state-default ui-corner-top "
					href="${ctx}/account/insideuserdept.action?userId=${id}&organizationId=${org.id}">用户部门</a>
				</li>
			</ul>
			<table class="noborder">
				<tr>
					<td>用&nbsp;户&nbsp;名:</td>
					<td>${userName}<input type="hidden" name="id" value="${id}" />
					</td>
				</tr>
				<tr>
					<td>邮&nbsp;&nbsp;&nbsp;&nbsp;箱:</td>
					<td><input type="text" id="email" name="email"
						value="${email}" />
					</td>
				</tr>
				<tr>
					<td>所属单位:</td>
					<td><s:select name="org.id" list="insideorganizationList"
							listKey="id" listValue="orgName"></s:select>
					</td>
				</tr>
				<tr class="type-check">
					<td>角&nbsp;&nbsp;&nbsp;&nbsp;色:</td>
					<td><s:checkboxlist name="checkedRoleIds" list="allRoleList"
							listKey="id" listValue="roleName" theme="custom" /></td>
				</tr>
				<tr>
					<td>姓&nbsp;&nbsp;名&nbsp;:</td>
					<td><input type="text" name="name" id="name" value="${name}" />
					</td>
					<td>性&nbsp;&nbsp;别&nbsp;:</td>
					<td><pt:code category="1001" name="sexv" toScope="request"></pt:code>
						<s:select name="sex" list="#request.sexv" listKey="value"
							listValue="label"></s:select></td>
				</tr>
				<tr>
					<td>年&nbsp;&nbsp;龄&nbsp;:</td>
					<td><input type="text" name="age" id="age" value="${age}" />
					</td>
					<td>职&nbsp;&nbsp;称&nbsp;:</td>
					<td><input type="text" name="dutyName" id="dutyName"
						value="${dutyName}" />
					</td>
				</tr>

				<tr>
					<td>学&nbsp;&nbsp;历&nbsp;:</td>
					<td><pt:code category="1002" name="degree" default="${degree}"></pt:code>
					</td>
					<td>专&nbsp;&nbsp;业&nbsp;:</td>
					<td><input type="text" name="specialty" id="specialty"
						value="${specialty}" />
					</td>
				</tr>

				<tr>
					<td>固定电话&nbsp;:</td>
					<td><input type="text" name="phone" id="phone"
						value="${phone}" />
					</td>
					<td>手&nbsp;&nbsp;机&nbsp;:</td>
					<td><input type="text" name="mobilePhone" id="mobilePhone"
						value="${mobilePhone}" />
					</td>
				</tr>
				<tr class="type-text">
					<td>用户管理&nbsp;:</td>
					<td>
						<s:checkbox name="enable"  value="#request.enable==1" fieldValue="1"></s:checkbox>可用
						<s:checkbox name="expired"  value="#request.expired==1" fieldValue="1"></s:checkbox>帐号过期
						<s:checkbox name="locked"   value="#request.locked==1" fieldValue="1" ></s:checkbox>锁定
						<s:checkbox name="credexpired"   value="#credexpired==0"  fieldValue="1"></s:checkbox>密码过期
					</td>
				</tr>
				<tr>
					<td>备注&nbsp;:</td>
					<td colspan="3"><textarea name="remark" rows="5" cols="60">${remark}</textarea>
					</td>
				</tr>
			</table>
				<div class="type-button">
						<input   type="submit" class="submit" value="提交" />&nbsp;
						<input   type="reset" value="返回" class="reset"
							onclick="history.back()" />
					</div>
		</div>
	</form>
</body>
</html>
